package pta;/**
 * @author： li
 * @date： 2022-04-03 11:45
 * @version 1.0
 */
import java.io.*;
public class 古风排版 {
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args) throws IOException {
        int n =Integer.parseInt(in.readLine());
        String a =in.readLine();
        StringBuilder b = new StringBuilder(a);
        int k;
        if(a.length()%n==0)
            k=a.length()/n;
        else
            k=(a.length()/n)+1;
        char[][] ans = new char[n+1][k+1];
        for(int i=k-1;i>=0;i--)
            for(int j=0;j<n;j++){
                if(!(b.length() ==0)){
                    ans[j][i]=b.charAt(0);
                    b.deleteCharAt(0);
                }
                else
                    break;
            }
        for(int i=0;i<n;i++){
            for(int j=0;j<k;j++){
                //空字符用'\0'表示
                if(ans[i][j]=='\0')
                    System.out.print(" ");
                else
                System.out.print(ans[i][j]+"");
            }
            System.out.println();
        }
    }
}
